﻿using System;
using System.Collections.Generic;
using System.Text;


using OT.Module.Model;
using DevExpress.Xpo;
using DevExpress.Data.Filtering;
using DevExpress.Xpo.DB;

namespace OT.Module.DAL
{
    public partial class OrderDetail_DAL
    {
        #region ~
        /// <summary>
        /// 构造函数，使用默认的连接字符串
        /// </summary>
        public OrderDetail_DAL()
        {

        }
        /// <summary>
        /// 构造函数，使用指定的连接字符串
        /// </summary>
        /// <param name="pConnectionStringName">连接字符串名称</param>
        public OrderDetail_DAL(string pConnectionStringName)
            : base(pConnectionStringName)
        {

        }
        #endregion

        #region GetByOrder

        public XPCollection<OrderDetail> GetByOrder(Session xpo, string orderId)
        {
            return new XPCollection<OrderDetail>(xpo, 
                CriteriaOperator.Parse( string.Format ( "BelongOrder.ID = '{0}'" , orderId ) ));
        }

        #endregion
    }
}
